@extends('layout.layout')

@section('content')




                               


<h1 class="page-title">商品分类管理</h1> 
  <div class="row-fluid"> 
   <div class="span12"> 
    <div class="widget"> 
    <div class="widget"> 
      <h4>修改分类</h4> 
     
    <form action="{{url('/admin/goodscate/upload')}}" method="post">
        <div class="container-fluid">
        <div class="widget">
      
            <div style="margin-left:150px; margin-top:50px;"  >
             
           <span  class="help-inline">父级分类</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select id="select-required" name="pid" data-required="true" class="parsley-validated" style="background: rgba(0,0,0,0.5)">
              @foreach($cates as $k=>$v)
              @if($v->id == $cate->pid)
                <option name="" value="{{$v->id}}" selected>{{$v->name}}</option>
              @else
                <option name="" value="{{$v->id}}">{{$v->name}}</option>
                @endif
                @endforeach 
                </div>
        </select>
        <div class="control-group info">
                                    <label class="control-label" for="inputInfo"></label>
                                    <div class="controls">
                                    <span class="help-inline">分类名称</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                
                                    <input name="name" type="text" id="inputInfo" value="{{$cate->name}}">
                               
                                    </div>
                                        </div>
                         <span  class="help-inline">是否启用:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                             
                         <input type="radio" name="status" value="1" @if(($cate->status) == 1) checked 
                         @endif >开启
                         <input type="radio" name="status" value="2" @if(($cate->status) == 2) checked 
                         @endif>关闭
                         






                        </div>
                        
            <div style="margin-left:270px;">
                <button class="btn btn-large icon-ok">确认修改</button>
           
            </div>
            <input type="hidden" name="id" value="{{$cate->id}}">
            <input type="hidden" name="xpid" value="{{$cate->pid}}">
            {{csrf_field()}}
        
     </div>
     </form>
 </div>


@endsection
